import Vue from 'vue'
import App from './App.vue'
import store from "./store"
import Vuex from "vuex"
import ElementUI from "element-ui"
// 引入包含所有接口请求函数模块的API对象
import * as API from '@/api'
import 'element-ui/lib/theme-chalk/index.css';
import router from "@/router"
// router.afterEach((to, from) => {
//   // console.log(this.$route.path.split('/').splice(1))
//   // console.log(to,from)

//   sessionStorage.clear();
//   window.sessionStorage.setItem("userdata", "Hello World!");
// })
// 引入fragement
import Fragment from 'vue-fragment'
Vue.use(Fragment.Plugin)

Vue.config.productionTip = false
Vue.use(ElementUI); //使用elementUI
Vue.use(Vuex);//使用Vuex
Vue.prototype.$API = API
new Vue({
  render: h => h(App),
  store,
  router
}).$mount('#app')
